<script type="text/javascript">
	$(document).ready(function(){
		$.validator.messages.required = "";
		$.validator.messages.date = "";
		$.validator.messages.email = "";
		$.validator.messages.number = "";
		$("#FormDangKy").validate();
	});
</script>

<div id="NoiDung" class="form">
  <h3 class="text-primary">ĐĂNG KÝ</h3>
  <form id="FormDangKy" action="index.php?do=dangky_xuly" method="post" class="form-horizontal" role="form">
  	<table class="table borderless">
    <tbody>
    <tr>
        <td>
        <div class="form-group form-custom">
          <label  for="hoten"> Họ và tên:</label>
          <div class="input-group">
            <input type="text" class="form-control" placeholder="Nhập tên người dùng" name="TenNguoiDung" class="required" />
            <span class=" input-group-addon">*</span></div>
        </div>
        </td>
        <td>
        <div class="form-group form-custom">
          <label  for="tendangnhap"> Tên đăng nhập:</label>
          <div class="input-group">
            <input type="text" class="form-control" placeholder="Nhập tên đăng nhập" name="TenDangNhap" class="required" />
            <span class=" input-group-addon">*</span></div>
        </div>
        </td>
    </tr>
    <tr>
        <td>
        <div class="form-group form-custom">
          <label  for="matkhau">Mật khẩu:</label>
          <div class="input-group">
            <input type="password" class="form-control" placeholder="Nhập mật khẩu" name="MatKhau" class="required" />
            <span class="input-group-addon">*</span></div>
        </div>
        </td>
 
        <td>
        <div class="form-group form-custom">
          <label  for="xacnhanmatkhau">Xác nhận lại mật khẩu:</label>
          <div class="input-group">
            <input type="password" class="form-control" placeholder="Xác nhận mật khẩu" name="XacNhanMatKhau" class="required" />
            <span class=" input-group-addon">*</span></div>
        </div>
        </td>
    </tr>
    <tr>
        <td>
        <div class="form-group form-custom">
          <label  for="diachi">Địa chỉ</label>
          <div class="input-group">
            <input type="text" class="form-control" placeholder="Nhập địa chỉ" name="DiaChi" class="required" />
            <span class=" input-group-addon">*</span></div>
        </div>
        </td>
        <td>
        <div class="form-group form-custom">
          <label  for="email">Email:</label>
          <div class="input-group">
            <input type="email" class="form-control" placeholder="Nhập email" name="Email" class="required" />
            <span class=" input-group-addon">*</span></div>
        </div>
        </td>
    </tr>
    <tr>
        <td>
        <div class="form-group form-custom">
          <label  for="dienthoai">Điện thoại:</label>
          <div class="input-group">
            <input type="text" class="form-control" placeholder="Nhập số điện thoại" name="DienThoai" class="required" />
            <span class="input-group-addon">*</span> </div>
        </div>
        </td>
        <td>
        <div class="form-group form-custom">
          <label  for="MaChucVu">Chức vụ:</label>
          <select name="MaChucVu" id="MaChucVu"  class="form-control">
             <?php
                $chucvu = new chucvubs();
                $danhsach = $chucvu->GetList();
				$dsChucVu = $chucvu->checkGiamDoc();
				
                for($i = 0; $i < count($danhsach); $i++ )
                {
					if($danhsach[$i]['MaChucVu'] != $dsChucVu[0]['MaChucVu'])
					echo "<option value=".$danhsach[$i]['MaChucVu'].">".$danhsach[$i]['TenChucVu']."</option>";
                }
            
            ?>
          </select>
        </div>
        </td>
    </tr>
    <tr>
        <td>
         <div class="form-group form-custom">
          <label  for="PhongBan">Phòng ban:</label>
          <select name="MaPhongBan" id="MaPhongBan"  class="form-control">
            <?php
                $phongban = new phongbanbs();
                $danhsach = $phongban->GetList();
                for($i = 0; $i < count($danhsach); $i++ )
                {
                    echo "<option value=".$danhsach[$i]['MaPhongBan'].">".$danhsach[$i]['TenPhongBan']."</option>";
                }
            
            ?>
          </select>
        </div>
        </td>
        <td>&nbsp;</td>
    </tr>
    <tr>
        <td colspan="2">
        <div class=" form-group form-custom">
            <label for="capcha">Mã Captcha:</label>
            <div align="center">
            <?php
                        require_once('recaptchalib.php');
                        $publickey = "6LcosukSAAAAAHWL-efF8zkGseVra8v6uqdZLCK7"; // you got this from the signup page
                        echo recaptcha_get_html($publickey);
                    ?>
              </div>
        </div>
        </td>
       
    </tr>
    <tr>
    <td colspan="2">
     <input type="submit" value="Đăng ký" class="btn-primary btn-md pull-right" />
    <p class="requirefields">(*): Các trường bắt buộc phải nhập.</p>
 
    </td></tr></tbody>
    </table>
  </form>
</div>
